Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pylint and pytest task #432

Merged
merged 1 commit into from
Jul 23, 2020
Merged

Conversation

wumaxd
Copy link
Member

@wumaxd wumaxd commented Jul 22, 2020

Changes

The Tasks can be used to run linting based on the module pylint and to execute unit-tests based on the module pytest. This is described in issue #364.

The Tasks are based on the official Python image and therefore the image tags can be used. The installation of pylint and pytest is done during the task to ensure the possibility to pin the version by using a requirements file.

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

  • Includes docs (if user facing)
  • Commit messages follow commit message best practices
  • Yaml file complies with yamllint rules.
  • Complies with Catalog Orgainization TEP, see example. Note An issue has been filed to automate this validation
    • File path follows <kind>/<name>/<version>/name.yaml

    • Has README.md at <kind>/<name>/<version>/README.md

    • Has mandatory metadata.labels - app.kubernetes.io/version the same as the <version> of the resource

    • Has mandatory metadata.annotations tekton.dev/pipelines.minVersion

    • mandatory spec.description follows the convention

        ```
      
        spec:
          description: >-
            one line summary of the resource
      
            Paragraph(s) to describe the resource.
        ```
      

See the contribution guide
for more details.


@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jul 22, 2020

CLA Check
The committers are authorized under a signed CLA.

@tekton-robot tekton-robot requested review from chmouel and a user July 22, 2020 09:07
@tekton-robot
Copy link

Hi @wumaxd. Thanks for your PR.

I'm waiting for a tektoncd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@tekton-robot tekton-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 22, 2020
@wumaxd
Copy link
Member Author

wumaxd commented Jul 22, 2020

@vinamra28 fyi: moved PR

@vinamra28
Copy link
Member

/ok-to-test

@tekton-robot tekton-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 22, 2020
@vinamra28
Copy link
Member

@wumaxd Could you please sign the CLA also 🙂

@wumaxd
Copy link
Member Author

wumaxd commented Jul 22, 2020

@wumaxd Could you please sign the CLA also 🙂

@vinamra28 yes already done so but it is still not showing. I opened already a ticket.

Copy link
Member

@vinamra28 vinamra28 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/cc @vdemeester @chmouel

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 23, 2020
@tekton-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vdemeester, vinamra28

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 23, 2020
@tekton-robot tekton-robot merged commit a0e2d1e into tektoncd:master Jul 23, 2020
- name: PYTHON
description: The used Python version, more precisely the tag for the Python image
type: string
default: "3.6"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't we use 3.8 (whichi s the latest) by default?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. We could even place there latest as it is the tag for the Python image. Do you think this would make sense or is too confusing having a Python version latest?

@wumaxd wumaxd deleted the pylint-pytest-task branch July 23, 2020 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants